﻿<%@ Page Title="" Language="C#" MasterPageFile="~/mobile/MobileAdmin.master" AutoEventWireup="true" CodeFile="study-year.aspx.cs" Inherits="mobile_study_year" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <div data-role="content">
        <asp:HiddenField ID="UniID" runat="server" />
        <asp:Chart ID="Chart3" runat="server" DataSourceID="YearOfStudySqlDataSource" Height="300px" 
              Width="300px">
              <Series>
                  <asp:Series Name="Series1" ChartType="Pie" XValueMember="year_of_study" YValueMembers="Column1" 
                      Legend="Legend1">
                  </asp:Series>
              </Series>
              <ChartAreas>
                  <asp:ChartArea Name="ChartArea1">
                  </asp:ChartArea>
              </ChartAreas>
              <Legends>
                  <asp:Legend Name="Legend1">
                  </asp:Legend>
              </Legends>
          </asp:Chart>
          <asp:SqlDataSource ID="YearOfStudySqlDataSource" runat="server" 
              ConnectionString="<%$ ConnectionStrings:ApplicationServices %>" 
              
            SelectCommand="select count(*),year_of_study from members where university_id=@uni group by year_of_study;">
              <SelectParameters>
                  <asp:ControlParameter ControlID="UniID" Name="uni" PropertyName="Value" />
              </SelectParameters>
          </asp:SqlDataSource>
    </div>
</asp:Content>

